import java.io.Serializable;

/**
 * This class constructs user instance and initialize its variables.  
 * @author G_14
 * @version December 2011
 */
public class User  implements Serializable
{
	//Instance variables *************************************************
	  
	/**
	* Variables that will receive the input from the loginUI
	*/
	  private String username;
	  private String password;
	  private int hours;
	  private String name;
	//Constructors ****************************************************
		  
	/**
	* Constructs an instance of the user.
	*/	
	  public User(){}
	  
		/**
		* Constructs an instance of the user.
		* @param user-the username
		* @param pswd-the user password
		*/		  
	public User(String user, String pswd) 
	  {
	    this.username=user;
	    this.password=pswd;
	  }
	/**
	* Constructs an instance of the user.
	* @param user-the username
	* @param pswd-the user password
	* @param n-the name
	* @param h-the user hours
	*/	
	public User(String user, String pswd,String n, int h) 
	  {
	    this.username = user;
	    this.password = pswd;
	    this.name = n;
	    this.hours = h;
	  }
	/**
	* Constructs an instance of the user.
	* @param user-the username
	* @param pswd-the user password
	* @param n-the name
	*/
	public User(String user, String pswd, String n) 
	  {
	    this.username = user;
	    this.password = pswd;
	    this.name = n;
	  }
	

	/**
	* This method returns the user username to the login controller.
	* @return username.
	*/		
	public String getUser()
	{
		return(this.username);
	}
	
	/**
	 * @return the hours
	 */
	public int getHours() {
		return hours;
	}

	/**
	 * @param hours the hours to set
	 */
	public void setHours(int hours) {
		this.hours = hours;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	* This method returns the user password to the login controller.
	* @return password.
	*/		
	public String getPassword()
	{
		return(this.password);
	}
	
	/**
	* This method set the user username input came from the GUI.
	* @return username.
	*/		
	public void setUser(String u)
	{
		this.username=u;
	}
	
	/**
	* This method set the user password input came from the GUI.
	* @return password.
	*/	
	public void setPassword(String p)
	{
		this.password=p;
	}
}
